/**
 * @author 开发请按照此风格编写js
 */
var parcelorderCtrl  = new XFApp.client();

XFApp.client.prototype.parcelorder = {
	urlItems : {
		queryLstURL : basePath+"/order/queryLst.do",
		deleteURL : basePath+"/admin/announcement/delete.do",
		saveOrUpdateURL : basePath+"/admin/announcement/saveOrUpdate.do"
	},
	detailEvent : function(id,type){
		_this = this;
		$.ajax({
			url :_this.urlItems.queryLstURL,
			data : {id:id},
			dataType : "json",
			type : 'post',
			success : function(data) {
				if(null == data){
					return;
				}
				_this.detailView(data,type);
			}
		});
	},

	//detail view
	detailView : function(data,type){
		//console.log(type);
		if(type==1){
			this.formData(data,type);
			$("#topicDetail").show();
		}
		if(type==0){
			this.formData(data,type);
			$("#texttopicDetail").show();
		}
		
	},
	event : function(){
		_this = this;
		$("#btnId").click(function(){
			alert("hello");
		});
		$("#addBtn").click(function(){
			_this.editDialog(null);
		});
	},
};
/**
 * 初始化
 */
$(function(){
	parcelorderCtrl.parcelorder.event();
	parcelorderCtrl.parcelorder.detailEvent();
});
